using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;

using MT.eVotePRS.Common;
using MT.eVotePRS.Model;

namespace MT.eVotePRS.UI
{
    public partial class frmRptInventStudentEvent : Form
    {
        public frmRptInventStudentEvent()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();        
        }

        private void btnGen_Click(object sender, EventArgs e)
        {
            try
            {
                List<InventoryTxn> lstHandsetTxn = new List<InventoryTxn>();
                Status status = Presentation.Util.Constants.Status_CheckOut;

                if (rbtCheckOut.Checked) // Check Out
                {
                    status = Presentation.Util.Constants.Status_CheckOut;
                }
                else if (rbtCheckIn.Checked) // Check In
                {
                    status = Presentation.Util.Constants.Status_CheckIn;
                }
                else if (rbtReportFault.Checked) // Faulty
                {
                    status = Presentation.Util.Constants.Status_Fault;
                }
                else if (rbtReportLost.Checked) // Lost
                {
                    status = Presentation.Util.Constants.Status_Lost;
                }

                new Presentation.Logic.ReportActions().ShowStudentEvents(status, dtPickerFrom.Value, dtPickerTo.Value);
                return;
            }
            catch (Exception ex)
            {
                DialogBox.boxWarning("Exception: " + ex.Source + "; " + "Message: " + ex.Message, "Warning!");
                Cursor.Current = Cursors.Default;
            }

            DialogBox.boxWarning("No history in Inventory!", "Warning!");
        }
    }
}